
// This do-file creates a dataset with all firms in BoardEx and ISS.  


cd "`c(pwd)'"   // Set working directory to wherever the user placed "replication_package"

* Define global paths relative to the main directory
global main_dir "`c(pwd)'"
global data_dir "$main_dir/data_analysis"
global rawdata_dir "$main_dir/data_raw"
global tables_dir "$main_dir/tables"

cd "$data_dir/"

use boardex_empl, clear
keep year gvkey
sort gvkey year
drop if gvkey==gvkey[_n-1] & year==year[_n-1]
save sample_od_boardex, replace

use iss_empl, clear
keep year gvkey
sort gvkey year
drop if gvkey==gvkey[_n-1] & year==year[_n-1]
save sample_od_iss, replace

append using sample_od_boardex
sort gvkey year
drop if gvkey==gvkey[_n-1] & year==year[_n-1]

*cd "/Users/Felipe/Dropbox/Research/Jerry_Felipe_Boards/data"
save sample_od, replace

